﻿namespace BM.Tools.WebControls.MForm.Controls.Items
{
    using System.Collections.Generic;
    using System.Xml.XPath;

    using BM.Tools.WebControls.MForm.Controls.Modifiers;

    /// <summary>
    /// The repeatable offspring item that is created from the <see cref="Branch" /> definition object
    /// </summary>
    public class BranchItem : OffspringsOwnerItem
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="BranchItem"/> class. 
        /// </summary>
        /// <param name="basis">
        /// The basis.
        /// </param>
        /// <param name="index">
        /// The index.
        /// </param>
        public BranchItem(Branch basis, int index) : base(basis, index)
        {
        }

        /// <summary>
        /// returns the css classes that are ascribed to this item
        /// </summary>
        /// <returns>
        /// the css classes that are ascribed to this item
        /// </returns>
        protected override string[] InitalizationCssClasses()
        {
            List<string> classes = new List<string>(base.InitalizationCssClasses());
            classes.Add(OffspringsOwnerCssClass);            
            return classes.ToArray();
        }
    }
}